var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("sdkConfig"),
    a = e("AdFactory"),
    i = (function () {
        function e() {
            (this.adFactory = null), (this.adConfig = null), (this.adFactory = a.default.produceAD());
        }
        return (
            (e.getInstance = function () {
                return e.instance || (e.instance = new e()), e.instance;
            }),
            (e.prototype.startLoadAd = function () {
                null != this.adConfig &&
                    (void 0 === this.adConfig.mainSwitch
                        ? console.log("ChaoQiGameSDK", "广告总开关未开启")
                        : void 0 === this.adConfig.advertIdentity
                        ? console.log("ChaoQiGameSDK", "广告ID未启用")
                        : this.adConfig.mainSwitch
                        ? null == this.adConfig.advertIdentity
                            ? console.log("ChaoQiGameSDK", "广告ID未启用")
                            : this.setAllAdConfig()
                        : console.log("ChaoQiGameSDK", "广告总开关未开启"));
            }),
            (e.prototype.setAllAdConfig = function () {
                void 0 !== this.adConfig.testVersion &&
                    null != this.adConfig.testVersion &&
                    0 != this.adConfig.testVersion &&
                    this.adFactory.GameVersion(this.adConfig.testVersion);
                var e = this.adFactory.getGameTestVersion(),
                    t = null;
                e &&
                void 0 !== this.adConfig.testAdvertSwitch &&
                null != this.adConfig.testAdvertSwitch &&
                this.adConfig.testAdvertSwitch
                    ? (t = this.adConfig.testAdvertSwitch)
                    : void 0 !== this.adConfig.advertSwitch &&
                      null != this.adConfig.advertSwitch &&
                      this.adConfig.advertSwitch &&
                      (t = this.adConfig.advertSwitch),
                    void 0 !== t &&
                        null != t &&
                        t &&
                        ((this.adFactory.SW_SystemBanner = t.bannerSwitch),
                        (this.adFactory.SW_SystemInters = t.intersSwitch),
                        (this.adFactory.SW_Video = t.videoSwitch),
                        (this.adFactory.SW_Native = t.nativeBigIntersSwitch),
                        (this.adFactory.SW_NativeBanner = t.nativeBannerSwitch),
                        (this.adFactory.SW_NativeInters = t.nativeIntersSwitch),
                        (this.adFactory.SW_CustomSwitch = t.customSwitch),
                        (this.adFactory.SW_Box = t.boxSwitch),
                        (this.adFactory.SW_Block = t.blockSwitch),
                        (this.adFactory.SW_BigNative = t.bigNativeSwitch),
                        (this.adFactory.SW_IconNative = t.iconNativeSwitch)),
                    void 0 !== this.adConfig.advertIdentity &&
                        null != this.adConfig.advertIdentity &&
                        this.adConfig.advertIdentity &&
                        ((this.adFactory.ID_SystemBanner = this.adConfig.advertIdentity.adBannerId),
                        (this.adFactory.ID_SystemInters = this.adConfig.advertIdentity.adIntersId),
                        (this.adFactory.ID_Native = this.adConfig.advertIdentity.adNativeId),
                        (this.adFactory.ID_NativeCustom = this.adConfig.advertIdentity.adNativeIntersId),
                        (this.adFactory.ID_AdCustomId = this.adConfig.advertIdentity.adCustomId),
                        (this.adFactory.ID_Video = this.adConfig.advertIdentity.adVideoId),
                        (this.adFactory.ID_Box = this.adConfig.advertIdentity.adBoxId),
                        (this.adFactory.ID_Block = this.adConfig.advertIdentity.adBrickId)),
                    void 0 !== this.adConfig.combineInters &&
                        null != this.adConfig.combineInters &&
                        this.adConfig.combineInters.enableSwitch &&
                        (this.adFactory.NUM_NativeIntersP = this.adConfig.combineInters.nativeIntersRatio),
                    void 0 !== this.adConfig.dynamicNativeInters &&
                        null != this.adConfig.dynamicNativeInters &&
                        (void 0 !== this.adConfig.dynamicNativeInters.intersSwitch &&
                            null != this.adConfig.dynamicNativeInters.intersSwitch &&
                            this.adConfig.dynamicNativeInters.intersSwitch &&
                            (this.adFactory.NUM_NativeIntersReport =
                                this.adConfig.dynamicNativeInters.nativeIntersRatio),
                        void 0 !== this.adConfig.dynamicNativeInters.bannerSwitch &&
                            null != this.adConfig.dynamicNativeInters.bannerSwitch &&
                            this.adConfig.dynamicNativeInters.bannerSwitch &&
                            ((this.adFactory.NUM_BannerErrMost = this.adConfig.dynamicNativeInters.bannerMostNumber),
                            (this.adFactory.NUM_BannerErrP = this.adConfig.dynamicNativeInters.bannerProbability),
                            (this.adFactory.NUM_BannerErrMust = this.adConfig.dynamicNativeInters.bannerClick)),
                        void 0 !== this.adConfig.dynamicNativeInters.videoSwitch &&
                            null != this.adConfig.dynamicNativeInters.videoSwitch &&
                            this.adConfig.dynamicNativeInters.videoSwitch &&
                            ((this.adFactory.NUM_VideoErrMost = this.adConfig.dynamicNativeInters.videoMostNumber),
                            (this.adFactory.NUM_VideoErrP = this.adConfig.dynamicNativeInters.videoProbability),
                            (this.adFactory.NUM_VideoErrMust = this.adConfig.dynamicNativeInters.videoClick)));
                var o = null;
                e && void 0 !== this.adConfig.testBaseControl && null != this.adConfig.testBaseControl
                    ? (o = this.adConfig.testBaseControl)
                    : void 0 !== this.adConfig.baseControl &&
                      null != this.adConfig.baseControl &&
                      (o = this.adConfig.baseControl),
                    void 0 !== o &&
                        null != o &&
                        (void 0 !== o.bannerSwitch &&
                            null != o.bannerSwitch &&
                            o.bannerSwitch &&
                            (void 0 !== o.refreshTime &&
                                null != o.refreshTime &&
                                0 != o.refreshTime &&
                                (this.adFactory.NUM_BannerUpdateTime = o.refreshTime),
                            void 0 !== o.priority &&
                                null != o.priority &&
                                o.priority &&
                                "nativeBanner" == o.priority &&
                                (this.adFactory.SW_SystemBannerFirst = !1),
                            void 0 !== o.maxClose &&
                                null != o.maxClose &&
                                0 != o.maxClose &&
                                (this.adFactory.NUM_BannerMostShow = o.maxClose)),
                        void 0 !== o.intersSwitch &&
                            null != o.intersSwitch &&
                            o.intersSwitch &&
                            ((this.adFactory.SW_IntersBaseControl = o.intersSwitch),
                            void 0 !== o.startNum &&
                                null != o.startNum &&
                                0 != o.startNum &&
                                (this.adFactory.NUM_IntersStart = o.startNum),
                            void 0 !== o.intervalNum &&
                                null != o.intervalNum &&
                                o.intervalNum &&
                                (this.adFactory.NUM_IntersIntervalNum = o.intervalNum),
                            void 0 !== o.intervalTime &&
                                null != o.intervalTime &&
                                0 != o.intervalTime &&
                                (this.adFactory.NUM_IntersIntervalTime = o.intervalTime),
                            void 0 !== o.delayEject &&
                                null != o.delayEject &&
                                0 != o.delayEject &&
                                (this.adFactory.NUM_IntersDelayTime = o.delayEject),
                            void 0 !== o.delayProbability &&
                                null != o.delayProbability &&
                                0 != o.delayProbability &&
                                (this.adFactory.NUM_IntersDelayP = o.delayProbability)),
                        void 0 !== o.originalSwitch &&
                            null != o.originalSwitch &&
                            o.originalSwitch &&
                            void 0 !== o.originalRefreshTime &&
                            null != o.originalRefreshTime &&
                            o.originalRefreshTime > 0 &&
                            (this.adFactory.NUM_NativeUpdateTime = o.originalRefreshTime)),
                    void 0 !== this.adConfig.desktopSwitch &&
                        null != this.adConfig.desktopSwitch &&
                        (void 0 !== this.adConfig.desktopSwitch.desktopIconSwitch &&
                            null != this.adConfig.desktopSwitch.desktopIconSwitch &&
                            this.adConfig.desktopSwitch.desktopIconSwitch &&
                            (this.adFactory.SW_AddDesktop = this.adConfig.desktopSwitch.desktopIconSwitch),
                        void 0 !== this.adConfig.desktopSwitch.activateDesktopIconSwitch &&
                            null != this.adConfig.desktopSwitch.activateDesktopIconSwitch &&
                            this.adConfig.desktopSwitch.activateDesktopIconSwitch &&
                            (this.adFactory.SW_IntersIntervalToAddDesktop =
                                this.adConfig.desktopSwitch.activateDesktopIconSwitch),
                        void 0 !== this.adConfig.desktopSwitch.autoAddDesktopNumber &&
                            null != this.adConfig.desktopSwitch.autoAddDesktopNumber &&
                            this.adConfig.desktopSwitch.desktopIconSwitch &&
                            this.adConfig.desktopSwitch.activateDesktopIconSwitch &&
                            0 != this.adConfig.desktopSwitch.autoAddDesktopNumber &&
                            (this.adFactory.NUM_AutoAddDeskMostTimes =
                                this.adConfig.desktopSwitch.autoAddDesktopNumber),
                        void 0 !== this.adConfig.desktopSwitch.intersAddDesktopNumber &&
                            null != this.adConfig.desktopSwitch.intersAddDesktopNumber &&
                            this.adConfig.desktopSwitch.activateDesktopIconSwitch &&
                            0 != this.adConfig.desktopSwitch.intersAddDesktopNumber &&
                            (this.adFactory.NUM_IntersToAddDesktopNumber =
                                this.adConfig.desktopSwitch.intersAddDesktopNumber)),
                    e ||
                        void 0 === this.adConfig.interErrSwitch ||
                        null == this.adConfig.interErrSwitch ||
                        (this.adFactory.InterErrSwitch = this.adConfig.interErrSwitch),
                    this.adFactory.createAd();
            }),
            (e.prototype.startLoadPushGamaes = function () {
                null != this.pushGamesConfig &&
                    (void 0 !== this.pushGamesConfig.masterSwitch && this.pushGamesConfig.masterSwitch
                        ? ((this.adFactory.SW_Statistics = this.pushGamesConfig.statisSwitch),
                          (this.adFactory.SW_NavigateIcon = this.pushGamesConfig.pushSwitch.iconSwitch),
                          (this.adFactory.SW_NavigateGroup = this.pushGamesConfig.pushSwitch.listSwitch),
                          (this.adFactory.SW_NavigateSettle = this.pushGamesConfig.pushSwitch.settleSwitch),
                          (this.adFactory.pushGameList = this.pushGamesConfig.pushGameList),
                          this.adFactory.startLoadPushGamaes())
                        : console.log("ChaoQiGameSDK", "互推主开关未开启"));
            }),
            (e.prototype.huaweiManualModel = function () {
                (this.adFactory.SW_SystemBanner = n.huaweiAdConfig.SW_SystemBanner),
                    (this.adFactory.SW_SystemInters = n.huaweiAdConfig.SW_SystemInters),
                    (this.adFactory.SW_Video = n.huaweiAdConfig.SW_Video),
                    (this.adFactory.SW_Native = n.huaweiAdConfig.SW_Native),
                    (this.adFactory.SW_NativeBanner = n.huaweiAdConfig.SW_NativeBanner),
                    (this.adFactory.SW_NativeInters = n.huaweiAdConfig.SW_NativeInters),
                    (this.adFactory.ID_SystemBanner = n.huaweiAdConfig.ID_SystemBanner),
                    (this.adFactory.ID_SystemInters = n.huaweiAdConfig.ID_SystemInters),
                    (this.adFactory.ID_Native = n.huaweiAdConfig.ID_Native),
                    (this.adFactory.ID_Video = n.huaweiAdConfig.ID_Video),
                    (this.adFactory.NUM_BannerUpdateTime = n.huaweiAdConfig.NUM_BannerUpdateTime),
                    (this.adFactory.SW_SystemBannerFirst = n.huaweiAdConfig.SW_SystemBannerFirst),
                    (this.adFactory.NUM_NativeIntersP = n.huaweiAdConfig.NUM_NativeIntersP),
                    n.huaweiAdConfig.SW_IntersBaseControl &&
                        ((this.adFactory.SW_IntersBaseControl = n.huaweiAdConfig.SW_IntersBaseControl),
                        (this.adFactory.NUM_IntersStart = n.huaweiAdConfig.NUM_IntersStart),
                        (this.adFactory.NUM_IntersIntervalNum = n.huaweiAdConfig.NUM_IntersIntervalNum),
                        (this.adFactory.NUM_IntersIntervalTime = n.huaweiAdConfig.NUM_IntersIntervalTime),
                        (this.adFactory.NUM_IntersDelayTime = n.huaweiAdConfig.NUM_IntersDelayTime),
                        (this.adFactory.NUM_IntersDelayP = n.huaweiAdConfig.NUM_IntersDelayP)),
                    this.adFactory.createAd();
            }),
            (e.prototype.getGameTestVersion = function () {
                return this.adFactory.getGameTestVersion();
            }),
            (e.prototype.showBanner = function () {
                this.adFactory.showBanner();
            }),
            (e.prototype.hideBanner = function () {
                this.adFactory.hideBanner();
            }),
            (e.prototype.getIntersFlag = function () {
                return this.adFactory.getIntersFlag();
            }),
            (e.prototype.showInters = function () {
                this.adFactory.showInters();
            }),
            (e.prototype.showNativeInters = function () {
                this.adFactory.showNativeInters();
            }),
            (e.prototype.showNativeBanner = function () {
                this.adFactory.showNativeBanner();
            }),
            (e.prototype.getVideoFlag = function () {
                return this.adFactory.getVideoFlag();
            }),
            (e.prototype.showVideo = function (e, t) {
                console.log('adcenter showVideo');
                this.adFactory.showVideo(e, t);
            }),
            (e.prototype.getNativeIconFlag = function () {
                return this.adFactory.getNativeIconFlag();
            }),
            (e.prototype.showNativeIcon = function (e, t, o, n) {
                this.adFactory.showNativeIcon(e, t, o, n);
            }),
            (e.prototype.hideNativeIcon = function () {
                this.adFactory.hideNativeIcon();
            }),
            (e.prototype.getNativeImageFlag = function () {
                return this.adFactory.getNativeImageFlag();
            }),
            (e.prototype.showNativeImage = function (e, t, o, n) {
                this.adFactory.showNativeImage(e, t, o, n);
            }),
            (e.prototype.hideNativeImage = function () {
                this.adFactory.hideNativeImage();
            }),
            (e.prototype.getNativeAdFlag = function (e) {
                return this.adFactory.getNativeAdFlag(e);
            }),
            (e.prototype.getNativeAdInfo = function (e) {
                return this.adFactory.getNativeAdInfo(e);
            }),
            (e.prototype.reportNativeAdShow = function (e) {
                this.adFactory.reportNativeAdShow(e);
            }),
            (e.prototype.reportNativeAdClick = function (e) {
                this.adFactory.reportNativeAdClick(e);
            }),
            (e.prototype.getNativeCloseErr = function () {
                return this.adFactory.getNativeCloseErr();
            }),
            (e.prototype.getNavigateIconFlag = function () {
                return this.adFactory.getNavigateIconFlag();
            }),
            (e.prototype.showNavigateIcon = function (e, t, o, n) {
                this.adFactory.showNavigateIcon(e, t, o, n);
            }),
            (e.prototype.hideNavigateIcon = function () {
                this.adFactory.hideNavigateIcon();
            }),
            (e.prototype.getNavigateGroupFlag = function () {
                return this.adFactory.getNavigateGroupFlag();
            }),
            (e.prototype.showNavigateGroup = function (e, t, o, n) {
                this.adFactory.showNavigateGroup(e, t, o, n);
            }),
            (e.prototype.hideNavigateGroup = function () {
                this.adFactory.hideNavigateGroup();
            }),
            (e.prototype.getNavigateSettleFlag = function () {
                return this.adFactory.getNavigateSettleFlag();
            }),
            (e.prototype.showNavigateSettle = function (e, t, o) {
                this.adFactory.showNavigateSettle(e, t, o);
            }),
            (e.prototype.hideNavigateSettle = function () {
                this.adFactory.hideNavigateSettle();
            }),
            (e.prototype.getNavigateBoxBannerFlag = function () {
                return this.adFactory.getNavigateBoxBannerFlag();
            }),
            (e.prototype.showNavigateBoxBanner = function () {
                this.adFactory.showNavigateBoxBanner();
            }),
            (e.prototype.hideNavigateBoxBanner = function () {
                this.adFactory.hideNavigateBoxBanner();
            }),
            (e.prototype.getNavigateBoxPortalFlag = function () {
                return this.adFactory.getNavigateBoxPortalFlag();
            }),
            (e.prototype.showNavigateBoxPortal = function () {
                this.adFactory.showNavigateBoxPortal();
            }),
            (e.prototype.hideNavigateBoxPortal = function () {
                this.adFactory.hideNavigateBoxPortal();
            }),
            (e.prototype.setGroup = function (e) {
                this.adFactory.setGroup(e);
            }),
            (e.prototype.hasAddDesktopFunc = function () {
                return this.adFactory.hasAddDesktopFunc();
            }),
            (e.prototype.getAddDesktopFlag = function (e) {
                this.adFactory.getAddDesktopFlag(e);
            }),
            (e.prototype.addDesktop = function (e) {
                this.adFactory.addDesktop(e);
            }),
            (e.prototype.phoneVibrate = function (e) {
                this.adFactory.phoneVibrate(e);
            }),
            (e.prototype.startGameVideo = function (e) {
                this.adFactory.startGameVideo(e);
            }),
            (e.prototype.pauseGameVideo = function () {
                this.adFactory.pauseGameVideo();
            }),
            (e.prototype.resumeGameVideo = function () {
                this.adFactory.resumeGameVideo();
            }),
            (e.prototype.stopGameVideo = function (e) {
                this.adFactory.stopGameVideo(e);
            }),
            (e.prototype.shareVideo = function (e, t, o, n, a) {
                this.adFactory.shareVideo(e, t, o, n, a);
            }),
            (e.prototype.jumpToMoreGamesCenter = function () {
                this.adFactory.jumpToMoreGamesCenter();
            }),
            (e.prototype.showMoreGamesBanner = function () {
                this.adFactory.showMoreGamesBanner();
            }),
            (e.prototype.hideMoreGamesBanner = function () {
                this.adFactory.hideMoreGamesBanner();
            }),
            (e.prototype.showFavoriteGuide = function (e, t, o) {
                this.adFactory.showFavoriteGuide(e, t, o);
            }),
            (e.prototype.getUserData = function (e) {
                this.adFactory.getUserData(e);
            }),
            (e.prototype.getUserInfo = function (e) {
                this.adFactory.getUserInfo(e);
            }),
            (e.prototype.getBoxFlag = function () {
                return this.adFactory.getBoxFlag();
            }),
            (e.prototype.showAppBox = function () {
                this.adFactory.showAppBox();
            }),
            (e.prototype.getBlockFlag = function () {
                return this.adFactory.getBlockFlag();
            }),
            (e.prototype.showBlock = function (e, t, o, n) {
                this.adFactory.showBlock(e, t, o, n);
            }),
            (e.prototype.hideBlock = function () {
                this.adFactory.hideBlock();
            }),
            (e.prototype.getVideoIntersFlag = function () {
                return this.adFactory.getVideoIntersFlag();
            }),
            (e.prototype.showVideoInters = function (e) {
                this.adFactory.showVideoInters(e);
            }),
            (e.prototype.exitTheGame = function () {
                this.adFactory.exitTheGame();
            }),
            (e.prototype.reportAnalytics = function (e, t) {
                this.adFactory.reportAnalytics(e, t);
            }),
            (e.prototype.showAuthentication = function (e) {
                this.adFactory.showAuthentication(e);
            }),
            (e.prototype.visitorExperience = function (e) {
                this.adFactory.visitorExperience(e);
            }),
            (e.prototype.showNativeAd = function (e, t, o, n) {
                this.adFactory.showNativeAd(e, t, o, n);
            }),
            (e.prototype.getOPPOShowMoreGameFlag = function () {
                return this.adFactory.getOPPOShowMoreGameFlag();
            }),
            (e.prototype.showOPPOMoreGame = function () {
                this.adFactory.showOPPOMoreGame();
            }),
            (e.prototype.hasNetwork = function (e) {
                this.adFactory.hasNetwork(e);
            }),
            (e.prototype.showReviewAlert = function () {
                this.adFactory.showReviewAlert();
            }),
            (e.prototype.showiOSADWithScene = function (e, t) {
                this.adFactory.showiOSADWithScene(e, t);
            }),
            (e.prototype.showiOSADWithType = function (e, t) {
                this.adFactory.showiOSADWithType(e, t);
            }),
            (e.prototype.videoUIShow = function (e) {
                this.adFactory.videoUIShow(e);
            }),
            (e.prototype.showPrivacyAgreement = function (e, t, o) {
                this.adFactory.showPrivacyAgreement(e, t, o);
            }),
            (e.prototype.getErrBannerFlag = function () {
                return this.adFactory.getErrBannerFlag();
            }),
            (e.prototype.showErrBanner = function (e) {
                this.adFactory.showErrBanner(e);
            }),
            (e.prototype.hideErrBanner = function () {
                this.adFactory.hideErrBanner();
            }),
            (e.prototype.getErrVideoFlag = function () {
                return this.adFactory.getErrVideoFlag();
            }),
            (e.prototype.buyProps = function (e, t, o, n) {
                this.adFactory.buyProps(e, t, o, n);
            }),
            (e.prototype.payComplete = function (e) {
                this.adFactory.payComplete(e);
            }),
            e
        );
    })();
o.default = i;
